package com.chuisha.stu.service;

import com.chuisha.common.CommonResult;
import com.chuisha.stu.service.vo.AccountVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "account-service")
public interface AccountFeign {
    @PostMapping("/account/insert")
    CommonResult<AccountVO> insert(@RequestBody AccountVO accountDTO);

    @PostMapping("/account/delete")
    CommonResult<Integer> delete(@RequestParam("accountCode") String accountCode);

    @PostMapping("/account/update")
    CommonResult<AccountVO> update(@RequestBody AccountVO accountDTO);

    @GetMapping("/account/getByCode/{accountCode}")
    CommonResult<AccountVO> getByCode(@PathVariable(value = "accountCode") String accountCode);
}